/ .. / / -> download
<?xml version='1.0'?>

<xsl:stylesheet version="2.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:fo="http://www.w3.org/1999/XSL/Format">


	<xsl:template match="levelledPara/para[1]">
		<xsl:choose>
			<xsl:when test="(count(ancestor-or-self::levelledPara)>=3)">
				<xsl:apply-templates/>
			</xsl:when>
			<xsl:otherwise>
				<fo:block space-after="8pt">
					<xsl:apply-templates/>
				</fo:block>
			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>

	<xsl:template match="footnote/para[1]">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="para | attentionListItemPara | commonInfoDescrPara">
		<fo:block>
			<xsl:choose>
				<xsl:when test="parent::listItem">
					<xsl:attribute name="space-after">0pt</xsl:attribute>
				</xsl:when>
				<xsl:otherwise>
					<xsl:attribute name="space-after">8pt</xsl:attribute>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:if test="ancestor::challenge">
				<xsl:attribute name="text-align-last">
					<xsl:text>justify</xsl:text>
				</xsl:attribute>
			</xsl:if>
			<xsl:if test="normalize-space(preceding-sibling::text())">
				<xsl:attribute name="space-before">
					<xsl:text>8pt</xsl:text>
				</xsl:attribute>
			</xsl:if>
			
			<xsl:apply-templates/>
			<xsl:if test="ancestor::challenge">
				<fo:leader leader-pattern="dots"/>
			</xsl:if>
			
		</fo:block>
	</xsl:template>

	<xsl:template match="simplePara">
		<xsl:choose>
			<xsl:when test="parent::displayText">
				<xsl:apply-templates/>				
			</xsl:when>
			<xsl:otherwise>
				<fo:block space-after="8pt" text-indent="0pt">
					<xsl:if test="normalize-space(preceding-sibling::text())">
						<xsl:attribute name="space-before">
							<xsl:text>8pt</xsl:text>
						</xsl:attribute>
					</xsl:if>
					<xsl:apply-templates/>
				</fo:block>
			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>

</xsl:stylesheet>

/ gopher://khzae.net/0/s1000d/links/projects/3031/Army S1000D Stylesheets/FO-3031-A00-USARMY-PARA_001-00_EN-US.xsl
Styles: Light Dark Classic